package com.gs.wechatdemo.util;

import android.app.Activity;
import android.os.Build;

public class ActivityUtil {

    public static boolean isSurvive(Activity activity) {
        return activity != null && !activity.isFinishing() &&
                (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 ||
                        !activity.isDestroyed());
    }
}
